You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

11 lines
377 B

import { triggerTask } from "../../../../scheduler/engine";
export default defineWrappedResponseHandler(async (event) => {
const id = getRouterParam(event, "id");
if (!id) return R.throwError(400, "Missing id", null);
// Fire and forget — trigger returns immediately, execution is async
triggerTask(id).catch(() => {});
return R.success({ triggered: true });
});